﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using GDoc.Domain;

namespace GDoc.Data.Sql
{
    public class UserRepository : RepositoryBase<User>, IUserRepository
    {
        public UserRepository(IUnitOfWork unitOfWorkInterface)
        {
            UnitOfWork = unitOfWorkInterface as UnitOfWork;
            Set = UnitOfWork.Context.Users;
        }

        public User GetByEmail(string email)
        {
            return GetAll().Where(u => u.Email == email).SingleOrDefault();
        }
    }
}
